﻿using System;

namespace Microsoft.Popfly.GameCreator.GameEngine.Behaviors
{
    public class TestBehavior : IBehavior
    {
        private Game m_game;
        private BehaviorOwner m_owner;
        public void Invoke(BehaviorOwner sender, Events.PGCEventArgs args)
        {
            if (m_owner.GetType() == typeof(Actor))
            {
                Actor actor = (Actor)m_owner;
                if (args.GetType() == typeof(Events.PGCKeyEventArgs))
                {
                    actor.XAcceleration += 100;
                }
            }
        }
        public TestBehavior(Game game, BehaviorOwner owner)
        {
            m_game = game;
            m_owner = owner; 
        }
    }
}
